/*
 * Copyright 2011-2012 Redia A/S
 * 
 * This file is part of Indhold+ for Android.
 *
 *  Redia Library App for Android is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Redia Library App for Android is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with Redia Library App for Android.  If not, see <http://www.gnu.org/licenses/>.
 */
package dk.redia.digiform.model;

import java.util.Map;

public class AdhlObject {
    private String url;
    private String recordId;
    private String creator;
    private String title;
    private String description;
    private String type;
    private String faustId;
    
    public AdhlObject(Map<String, Object> data) {
    	if (data.containsKey("url")) {
    		setUrl((String)data.get("url"));
    	}
    	if (data.containsKey("recordId")) {
    		setRecordId((String)data.get("recordId"));    		
    	}
    	if (data.containsKey("creator")) {
    		setCreator((String)data.get("creator"));
    	}
    	if (data.containsKey("title")) {
    		setTitle((String)data.get("title"));
    	}
    	if (data.containsKey("description")) {
    		setDescription((String)data.get("description"));
    	}
    	if (data.containsKey("type")) {
    		setType((String)data.get("type"));
    	}
    	if (data.containsKey("faust")) {
    		setFaustId((String)data.get("faust"));
    	}
    }

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getRecordId() {
		return recordId;
	}

	public void setRecordId(String recordId) {
		this.recordId = recordId;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getFaustId() {
		return faustId;
	}

	public void setFaustId(String faustId) {
		this.faustId = faustId;
	}
    
}
